<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        html{
            font-family: monospace;
        }
     </style>
    <script>
        document.write("格式一");
        document.write("<br/>");
        var i=1;
        while( i<=9){
            var j=1;
            while(j<=i){
            document.write(i+"*"+j+"="+i*j);
            i*j>=10?document.write("&nbsp;"):document.write("&nbsp;&nbsp;");
            j++
            }
            i++;
         document.write("<br/>");
            
        }

        document.write("格式二");
        document.write("<br/>");
        var i=9;
         while(i>=1){
             var j=1;
             while(j<=i){
             document.write(i+"*"+j+"="+i*j);
             i*j>=10?document.write("&nbsp;"):document.write("&nbsp;&nbsp;");
             j++;
             }
             i--
        document.write("<br/>");
            
         }
         document.write("格式三");
         document.write("<br/>");
         var i=1;
         while(i<10){
            var j=9;
             while(j>i){
                document.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;        ");
                   j--;
             }
             var j=i;
             while(j>0){
                document.write(j+'*'+i+'='+i*j);
                i*j>=10?document.write("&nbsp;&nbsp;"):document.write("&nbsp;&nbsp;&nbsp;"); 
                j--;
             }
             
             i++;
            
             document.write("<br/>");
         }
         document.write("格式四");
         document.write("<br/>");
        var i=9;
         while(i>=1){
            var j=9;
            while(j>i){
                document.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;        "); 
                j--;
             }
             var j=i;
             while(j>0){
                document.write(j+'*'+i+'='+i*j);
                i*j>=10?document.write("&nbsp;&nbsp;"):document.write("&nbsp;&nbsp;&nbsp;"); 
                j--;
             }
              
            
            i--;
            

            document.write("<br/>");
             
         }

        
    </script>
</head>
<body>
    
</body>
</html>